package com.zrwl.poscloud.commons.vo.charge;

import com.zrwl.poscloud.commons.utils.StringUtils;
import lombok.Data;

/**
 * @author liuxiaolong
 * @date 2022/7/31
 * @description 按房间展示
 */
@Data
public class RoomResultVo extends JsonBaseVO {

    private String systemUid; //所属系统的id
    private String systemName; //外部系统名称

    private String estateName; //小区名称
    private String buildingNum; //楼栋编号
    private String unitName;  //单元
    private int customerType;
    private String customerUid; //用户编号
    private String customerCode; //用户编号
    private String customerName; //用户姓名
    private String roomNum; //门牌号
    private String telephone; //联系电话
    private String jsonData; //json数据，不同系统key可能不同


    private String uid; //内部id
    private String code; //内部code
    private String name; //内部name
    private String oldName; //内部oldName

    public String getExternalId() {
        if(StringUtils.isEmpty(this.getId())) {
            return null;
        }
        int index = this.getId().indexOf('-');
        if(index <=0 ){
            return null;
        }
        return this.getId().substring(index+1);
    }

}
